package com.lcp.se.config;

import com.tencentyun.TLSSigAPIv2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 用于配置腾讯实时音视频 userSig 计算的 TLSSigAPIv2
 *
 * @author lcp
 * @date 2020/8/28 9:35
 */
@Configuration
public class TLSSigAPIv2Config {
    @Value("${mini-program.sdk-appid}")
    private Long SDKAppID;

    @Value("${mini-program.user-sig-key}")
    private String key;

    @Bean
    public TLSSigAPIv2 tlsSigAPIv2() {
        return new TLSSigAPIv2(SDKAppID, key);
    }
}
